#include "widget.h"
#include "ui_widget.h"
#include<QDebug>


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}



void Widget::on_pushButton_clicked()
{
    qDebug()<<"执行了槽函数";
}

void Widget::on_pushButton_2_clicked()
{
    //切换按钮的状态
    bool ret = ui->pushButton->isEnabled();

    if(ret)
    {
        ui->pushButton->setEnabled(false);
    }
    else {
        ui->pushButton->setEnabled(true  );
    }

}
